package com.zerosky.crm.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.zerosky.crm.dao.DocumentDAO;
import com.zerosky.crm.po.Document;
import com.zerosky.crm.service.DocumentService;

/**
 * Document业务逻辑实现类
 * 
 * @author hugy;
 * @since 2017-06-09
 *
 */
@Service(value="documentService")
public class DocumentServiceImpl implements DocumentService {

	@Autowired
	private DocumentDAO documentDAO; // Document数据接口

	/**
	 * Document列表
	 * 
	 * @author hugy;
	 * @since 2017-06-09
	 */
	@Transactional(propagation = Propagation.NOT_SUPPORTED) // 不开启事务
	public List<Document> getDocumentList() {
		return documentDAO.getDocumentList();
	}

	@Override
	public int addDocumentList(List list) {
		return documentDAO.addDocumentList(list);
	}

	@Override
	public int deleteDocumentById(String id) {
		return documentDAO.deleteDocumentById(id);
	}

}
